const obj1 = {
  a: '123',
  b: '234'
}

const proxy = new Proxy(obj1, {
  get(target, property) {
    return Reflect.get(target, property);// 实际上等于在proxy内没有定义get方法
  }
});


//------------------------------
const obj2 = {
  a: '123',
  b: '234'
}

//用法凌乱
console.log('name' in obj2);//判断
console.log(delete obj2['age']);//删除
console.log(Object.keys(obj2));//获取关键词

//统一用法
console.log(Reflect.has(obj2, 'name'));
console.log(Reflect.deleteProperty(obj2, 'age'));
console.log(Reflect.ownKeys(obj2))